<?php

/**
 * Adresa form base class.
 *
 * @package    vvberp
 * @subpackage form
 * @author     Flo
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseAdresaForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'          => new sfWidgetFormInputHidden(),
      'client_id'   => new sfWidgetFormPropelChoice(array('model' => 'Client', 'add_empty' => true)),
      'furnizor_id' => new sfWidgetFormPropelChoice(array('model' => 'Furnizor', 'add_empty' => true)),
      'user_id'     => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => true)),
      'gmap'        => new sfWidgetFormInput(),
      'tip'         => new sfWidgetFormInput(),
      'detalii'     => new sfWidgetFormTextarea(),
      'updated_at'  => new sfWidgetFormDateTime(),
      'created_at'  => new sfWidgetFormDateTime(),
      'created_by'  => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => true)),
      'updated_by'  => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => true)),
    ));

    $this->setValidators(array(
      'id'          => new sfValidatorPropelChoice(array('model' => 'Adresa', 'column' => 'id', 'required' => false)),
      'client_id'   => new sfValidatorPropelChoice(array('model' => 'Client', 'column' => 'id', 'required' => false)),
      'furnizor_id' => new sfValidatorPropelChoice(array('model' => 'Furnizor', 'column' => 'id', 'required' => false)),
      'user_id'     => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id', 'required' => false)),
      'gmap'        => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'tip'         => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'detalii'     => new sfValidatorString(array('required' => false)),
      'updated_at'  => new sfValidatorDateTime(array('required' => false)),
      'created_at'  => new sfValidatorDateTime(array('required' => false)),
      'created_by'  => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id', 'required' => false)),
      'updated_by'  => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id', 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('adresa[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Adresa';
  }


}
